from lib.ZButton import ZButton


class BarketBtn ( ZButton ) :
	def __init__ ( self , father , s_in , s_out ) :
		super ( BarketBtn , self ).__init__ ( father , s_in , s_out , [ 40 , 40 ] )
		self.pa = 10
		self.current = 0
		self.speed = 1

	def draw ( self ) :
		super ( BarketBtn , self ).draw ( )
		if self._running :
			if self.current <= self.pa :
				self.current += self.speed

	def update ( self , event , mouse_pos , mouse_key ) :
		if self._running :
			if self.current > self.pa :
				super ( BarketBtn , self ).update ( event , mouse_pos , mouse_key )
